import request from '@/axios'
import { FeatureType } from './types'

export const getFeatureListApi = (params: any) => {
  return request.get<FeatureType[]>({ url: '/check/feature', params })
}

export const addFeatureApi = (data: any) => {
  return request.post({ url: '/check/feature', data })
}

export const putFeatureApi = (data: any) => {
  return request.put({ url: `/check/feature/${data.id}`, data })
}

export const deleteFeatureApi = (ids: string[] | number[]) => {
  return request.delete({ url: '/check/feature', data: ids })
}
